package com.happyfamily.springboot.crowdsourcingplatform.dao.wang;

import com.happyfamily.springboot.crowdsourcingplatform.model.Rule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RuleDao
{
	//前端规则中心显示
	public List<Rule> ruleList();
	//后台查询规则列
	public List<Rule> ruleTable(@Param("startPosition") Integer startPosition, @Param("limit") Integer limit, @Param("uname") String uname, @Param("rtitle") String rtitle, @Param("rcontent") String rcontent, @Param("rtime") String rtime);
	//后台查询规则的条数
	public Long ruleCount(@Param("uname") String uname, @Param("rtitle") String rtitle, @Param("rcontent") String rcontent, @Param("rtime") String rtime);
	//后台对新增规则的标题重名查询
	public int titleCount(@Param("rtitle") String rtitle);
	//后台新增规则
	public int ruleAdd(@Param("rtitle") String rtitle, @Param("rcontent") String rcontent, @Param("rtime") String rtime, @Param("uaccount") String uaccount);
	//后台新增规则
	public int ruleUpdata(@Param("rid") String rid, @Param("rtitle") String rtitle, @Param("rcontent") String rcontent, @Param("rtime") String rtime, @Param("uaccount") String uaccount);
	//管理员删除规则
	public int ruleDelete(@Param("rid") String rid);
	//管理员规则修改回显
	public Rule ruleReview(@Param("rid") String rid);
}
